package com.item.news.redis;

import redis.clients.jedis.Jedis;

/**
 * @ClassName RedisTest
 * @Description TODO
 * @Author WangDong
 * @Date 2019/2/14 13:06
 * @Version 1.0
 **/
public class RedisTest {

    public static void main(String[] args) {

        Jedis jedis = new Jedis("localhost");
        System.out.println("连接成功");
        //设置 redis 字符串数据
        jedis.set("w3ckey", "www.w3cschool.cn");
        // 获取存储的数据并输出
        System.out.println("redis 存储的字符串为: "+ jedis.get("w3ckey"));
    }

}
